<?php if (!defined('THINK_PATH')) exit();?><div class="col-md-9 department-log" style="display:none">
	<div style="width:100%;height:90px;"></div>
	<div class="panel panel-default" style="margin-top:10px;">
		<div class="panel-heading">
		  <h4 class="panel-title">
			<a class="accordion-toggle data-parent="#accordion">部门日志</a>
			<select id="select_viewlog_method" class="pull-right">
				<option value="0">查看方式</option>
				<option value="1">周日志</option>
			</select>
			<select id="select_departmentlog_id" class="pull-right" style="width:30%;margin-right:10px">
				<option value="-2">选择部门</option>
				<?php if(is_array($department)): $i = 0; $__LIST__ = $department;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["department_id"]); ?>"><?php echo ($vo["department_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
			</select>
		  </h4>
		</div>
		<div class="panel-collapse in department-logs">
		  <div class="panel-body department-log-list">
		  
			<input type="text" class="form-control" id="datepicker" style="width:30%;margin-bottom:15px;display:inline-block"/>
			<input type="button" class="btn btn-primary" department-id="" view-method="" id="search-by-datepicker" value="搜索" style="margin-top:-15px">
			<div class="worker-worklog-list">
				<div class="panel-group worker-worklog-contents" id="accordion">
					<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="panel panel-default">
							<div class="panel-heading">
							  <h4 class="panel-title">
								<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapse<?php echo ($vo["department_id"]); ?>" style="display:block;width:100%;text-decoration:none"><?php echo ($vo["department_name"]); ?></a>
							  </h4>
							</div>
							<div id="collapse<?php echo ($vo["department_id"]); ?>" class="panel-collapse collapse in">
							  <div class="panel-body">
								<?php if($vo["worker_list"] == NULL): ?><h4 style="text-align:center"><span class="label label-primary">该部门暂无成员</span></h4>
								<?php else: ?>
								<ul class="list-group">
									<?php if(is_array($vo["worker_list"])): $i = 0; $__LIST__ = $vo["worker_list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$worker): $mod = ($i % 2 );++$i;?><li class="list-group-item"><a><?php echo ($worker["name"]); ?>
										<?php if($worker["worklog_list"] == NULL): ?>(没有写日志)</a></li>
										<?php else: ?>
											</a></li>
											<ul class="nav nav-pills nav-stacked">
												<?php if(is_array($worker["worklog_list"])): $i = 0; $__LIST__ = $worker["worklog_list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$worklog): $mod = ($i % 2 );++$i;?><li class="tooltips" data-placement="top" data-toggle="tooltip" data-original-title="点击查看详细内容及留言">
														<a href="javascript:_MP('<?php echo ($worklog["worklog_id"]); ?>','__APP__/Comment/commentList')">
															<i class="glyphicon glyphicon-arrow-right"></i>
															<span class="work-log-title<?php echo ($worklog["worklog_id"]); ?>">
																<?php if($worklog["title"] == ''): ?>无标题
																<?php else: ?>
																<?php echo ($worklog["title"]); endif; ?>
															</span>
															<span class="pull-right">发表于:<i><?php echo ($worklog["create_time"]); ?></i></span>
															<span class="hide work-log-content<?php echo ($worklog["worklog_id"]); ?>"><?php echo ($worklog["work"]); ?></span>
														</a>
													</li><?php endforeach; endif; else: echo "" ;endif; ?>
											</ul><?php endif; endforeach; endif; else: echo "" ;endif; ?>
								</ul><?php endif; ?>
							  </div>
							</div>
						</div><?php endforeach; endif; else: echo "" ;endif; ?>
				</div>
			</div>
		  </div>
		</div>
	</div>
</div>
<script>
	$(function(){
		$(".tooltips").tooltip();
		$(".date-picker-wp").remove();
		new DatePicker('date', {inputId: 'datepicker', className: 'date-picker-wp',seprator: '-'});
	});
</script>